package Statistics;

/**
 * Specifies how the Level attribute will act.
 * @author Hetalar
 * 07/02/2012 
 */
public class Level extends Stat
{	
	private static final String STAT_NAME = "LEVEL";
	private static final int STAT_ALTER = Statistics.STAT_EXP_MAX;
		
	public Level(Statistics stat, int startingValue)
	{
		super(stat, startingValue, STAT_NAME, Statistics.STAT_LEVEL);
	}
	
	public Level(Statistics stat)
	{
		super(stat, 0, STAT_NAME, Statistics.STAT_LEVEL);
	}
	
	protected void applyStat(int oldValue)
	{
		this.statistic.setStat(STAT_ALTER, 
				Coefficients.calcExpReqLevel(this.value, this.statistic));
	}
}
